﻿using ET_DbCommon.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;

namespace ET_DbCommon.DAL
{
    public static class Sys_UserDAL
    {
        public static Sys_UserModel GetUserInfo(String UserName,string PassWord)
        {
            Sys_UserModel UserInfo = new Sys_UserModel();
            string where = "where userName='{0}' and PassWord='{1}'";
            where = string.Format(where, UserName,PassWord);
            using (var conn = MySqlHelper.GetConnection())
            {
                UserInfo = MySQLExt.GetByWhereFirst<Sys_UserModel>(conn, where);
                if (UserInfo == null)
                    return null;
                return UserInfo;
            }
        }
    }
}
